package Java0311;

public class Array12 {
    public static void main(String[] args) {
        //定义一个整数数组，输出比平均值大的数
        int[] array = {6, 43, 2, 56, 100, 22, 6, 233, -8, 254};
        double sum = 0;
        for (int i = 0; i < array.length; i++) {
            sum += array[i];
        }
        double avg = sum / array.length;
        for (int i = 0; i < array.length; i++) {
            if (avg < array[i]) {
                System.out.println(array[i]);
            }
        }
    }
}
